package c.c.b.a.a.a;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import c.c.b.a.a.c.a.b;

public final class a<T extends Activity & b> {
    public static String a(T t) {
        return t.getIntent().getStringExtra("com.twofortyfouram.locale.intent.extra.BLURB");
    }

    public static void b(T t, Bundle bundle) {
        c.c.a.a.c(t, "activity");
        Intent intent = t.getIntent();
        if (!d(intent) || c.c.c.c.b.a(intent) || c.c.c.c.b.b(((b) t).b())) {
        }
    }

    /* JADX WARNING: Code restructure failed: missing block: B:3:0x000c, code lost:
        r4 = (c.c.b.a.a.c.a.b) r3;
     */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public static void c(T r3, boolean r4) {
        /*
            android.content.Intent r0 = r3.getIntent()
            boolean r0 = d(r0)
            if (r0 == 0) goto L_0x0048
            if (r4 != 0) goto L_0x0048
            r4 = r3
            c.c.b.a.a.c.a.b r4 = (c.c.b.a.a.c.a.b) r4
            android.os.Bundle r0 = r4.c()
            if (r0 == 0) goto L_0x0048
            c.c.a.b.a(r0)
            java.lang.String r1 = r4.a(r0)
            java.lang.String r2 = "blurb"
            c.c.a.a.c(r1, r2)
            android.os.Bundle r2 = r4.b()
            boolean r2 = c.c.c.c.a.a(r0, r2)
            if (r2 == 0) goto L_0x0035
            java.lang.String r4 = r4.e()
            boolean r4 = r1.equals(r4)
            if (r4 != 0) goto L_0x0048
        L_0x0035:
            android.content.Intent r4 = new android.content.Intent
            r4.<init>()
            java.lang.String r2 = "com.twofortyfouram.locale.intent.extra.BUNDLE"
            r4.putExtra(r2, r0)
            java.lang.String r0 = "com.twofortyfouram.locale.intent.extra.BLURB"
            r4.putExtra(r0, r1)
            r0 = -1
            r3.setResult(r0, r4)
        L_0x0048:
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: c.c.b.a.a.a.a.c(android.app.Activity, boolean):void");
    }

    private static boolean d(Intent intent) {
        c.c.a.a.c(intent, "intent");
        String action = intent.getAction();
        return "com.twofortyfouram.locale.intent.action.EDIT_CONDITION".equals(action) || "com.twofortyfouram.locale.intent.action.EDIT_SETTING".equals(action);
    }

    public static Bundle e(T t) {
        c.c.a.a.c(t, "activity");
        Bundle bundleExtra = t.getIntent().getBundleExtra("com.twofortyfouram.locale.intent.extra.BUNDLE");
        if (bundleExtra == null || !((b) t).f(bundleExtra)) {
            return null;
        }
        return bundleExtra;
    }

    public static void f(T t, Bundle bundle) {
        c.c.a.a.c(t, "activity");
        if (d(t.getIntent()) && bundle == null) {
            b bVar = (b) t;
            Bundle b2 = bVar.b();
            String e = bVar.e();
            if (b2 != null && e != null) {
                bVar.d(b2, e);
            }
        }
    }
}
